package com.act.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.act.constant.ResponseEnum;

/**
 * @desc 成功响应实体
 * @author Javis
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseSuccess<T> extends Response {

    /* 响应成功返回的数据内容 */
    private T data;

    public T getData() {
        return data;
    }

    public ResponseSuccess() {
        resultCode = ResponseEnum.SUCCESS.getCode();
    }

    public ResponseSuccess(T data) {
        resultCode = ResponseEnum.SUCCESS.getCode();
        this.data = data;
    }
}